<%
  @portal_style = terminal_merchant.portal_style
  if @portal_style
    @banners = @portal_style.banners
    @mboxes = @portal_style.valid_mboxes
  end
%>
<div class="container" >
  <div class="row mbot30">
    <div class="col-lg-5 col-xs-12 col-centered">
      <%= render partial: "partial/adv", locals: { title: @portal_style.try(:name) } %>

      <% if terminal_merchant && (@auth_token && @auth_token.init?) %>
        <div class="row span5 col-centered free-wifi">
          <%= link_to wifi_login_url(vtoken: params[:vtoken], mid: params[:mid]) do %>
          <h4 class="text-center"><%= image_tag 'tu_01_03.png',height: '23' %>点击免费上网</h4>
          <% end %>
        </div>
      <% end %>

      <!-- portal images start -->
      <div class="portal_images">
        <div class="row span5 col-centered">
          <ul>
            <% @mboxes.each do |mbox| %>
              <li class="col-lg-6 col-xs-6">
                <div>
                  <section>
                    <%= link_to(eval "#{mbox.detail_url}(mid: params[:mid], vtoken: params[:vtoken])") do %>
                      <div class="mf-box">
                        <%= image_tag mbox.default_cover %>
                        <h5><%= mbox.name %></h5>
                      </div>
                    <% end %>
                  </section>
                </div>
              </li>
            <% end %>
          </ul>
        </div>
      </div>
      <!-- portal images end -->

  </div>
  </div>
</div>
